﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace housingsafety.server.Models
{
    public class TaskBuildForm
    {
        public string Id { get; set; }

        public List<TaskBuildGroupForm> Form { get; set; }
    }


    public class TaskBuildGroupForm
    {
        public string Group { get; set; }

        public List<TaskBuildKeyValue> Data { get; set; }
    }

    public class TaskBuildKeyValue
    {
        public string Key { get; set; }

        public string Alias { get; set; }

        public bool IsPhoto { get; set; }

        public string Value { get; set; }

        public List<string> photosValue { get; set; }
    }

    public class TaskBuildingDto
    {
        public string Id { get; set; }
        public string Bh { get; set; }
        public string Province { get; set; }
        public string City { get; set; }
        public string Xzqdm { get; set; }
        public string XzqdmAlias { get; set; }
        public string Town { get; set; }
        public string TownAlias { get; set; }
        public string Village { get; set; }
        public string ZuQg { get; set; }
        public string LuQg { get; set; }
        public string HaoQg { get; set; }
        public string Address { get; set; }
        public string Hzxm { get; set; }

        public string Yhfwbh { get; set; }

        public string Fwbh { get; set; }

        /// <summary>
        /// 初判 1存在严重安全隐患，3存在一般安全隐患，2未发现安全隐患
        /// </summary>
        public string Aqyhcp { get; set; }

        /// <summary>
        /// 初判结果别名
        /// </summary>
        public string AqyhcpAlias { get; set; }

        public string Geometry { get; set; }

        public double Lng { get; set; }

        public double Lat { get; set; }

        public int? Result { get; set; }

        public int? CityResult { get; set; }

        /// <summary>
        /// 几何BoundingBox
        /// </summary>
        public ZmRect BoundingBox { get; set; }
    }

    public class TaskBuildingAttrDto
    {
        public string Id { get; set; }
        public string Bh { get; set; }
        public string Province { get; set; }
        public string City { get; set; }
        public string Xzqdm { get; set; }
        public string XzqdmAlias { get; set; }
        public string Town { get; set; }
        public string TownAlias { get; set; }
        public string Village { get; set; }
        public string ZuQg { get; set; }
        public string LuQg { get; set; }
        public string HaoQg { get; set; }
        public string Address { get; set; }
        public string Hzxm { get; set; }

        public string Yhfwbh { get; set; }

        public string Fwbh { get; set; }

        /// <summary>
        /// 初判 1存在严重安全隐患，3存在一般安全隐患，2未发现安全隐患
        /// </summary>
        public string Aqyhcp { get; set; }

        /// <summary>
        /// 初判结果别名
        /// </summary>
        public string AqyhcpAlias { get; set; }

        public string Geometry { get; set; }

        public double Lng { get; set; }

        public double Lat { get; set; }

        public int? Result { get; set; }

        public int? CityResult { get; set; }

        public string Btglx { get; set; }
        public string CityBtglx { get; set; }
        public int? Aqyhrycc { get; set; }

        public string Ccsj { get; set; }

        public string Ccjl { get; set; }


        /// <summary>
        /// 几何BoundingBox
        /// </summary>
        public ZmRect BoundingBox { get; set; }
    }

    public class TaskBuildingGeomDto
    {
        public string Id { get; set; }

        public string Yhfwbh { get; set; }

        public string Fwbh { get; set; }

        public string Address { get; set; }

        public string Geometry { get; set; }

        public double Lng { get; set; }

        public double Lat { get; set; }

        public int? Result { get; set; }

        [Column("city_result")]
        public int? CityResult { get; set; }

        /// <summary>
        /// 几何BoundingBox
        /// </summary>
        public ZmRect BoundingBox { get; set; }
    }

    public class AreaTaskBuildingExportDto
    {
        [Npoi.Mapper.Attributes.Column("ID")]
        public string Id { get; set; }
        [Npoi.Mapper.Attributes.Column("编号")]
        public string Bh { get; set; }
        [Npoi.Mapper.Attributes.Column("自建房安全排查编号")]
        public string Yhfwbh { get; set; }
        [Npoi.Mapper.Attributes.Column("普查房屋编号")]
        public string Fwbh { get; set; }
        [Npoi.Mapper.Attributes.Column("省编码")]
        public string Province { get; set; }
        [Npoi.Mapper.Attributes.Column("市编码")]
        public string City { get; set; }
        [Npoi.Mapper.Attributes.Column("区县编码")]
        public string Xzqdm { get; set; }
        [Npoi.Mapper.Attributes.Column("区县编码(中文)")]
        public string XzqdmAlias { get; set; }
        [Npoi.Mapper.Attributes.Column("街道编码")]
        public string Town { get; set; }
        [Npoi.Mapper.Attributes.Column("街道编码(中文)")]
        public string TownAlias { get; set; }
        [Npoi.Mapper.Attributes.Column("村（社区）编码")]
        public string Village { get; set; }
        [Npoi.Mapper.Attributes.Column("组")]
        public string ZuQg { get; set; }
        [Npoi.Mapper.Attributes.Column("路（街、巷）")]
        public string LuQg { get; set; }
        [Npoi.Mapper.Attributes.Column("号")]
        public string HaoQg { get; set; }
        [Npoi.Mapper.Attributes.Column("建筑地址")]
        public string Address { get; set; }
        [Npoi.Mapper.Attributes.Column("户主姓名")]
        public string Hzxm { get; set; }

        /// <summary>
        /// 初判 1存在严重安全隐患，3存在一般安全隐患，2未发现安全隐患
        /// </summary>
        [Npoi.Mapper.Attributes.Column("初步判定")]
        public string Aqyhcp { get; set; }

        /// <summary>
        /// 初判结果别名
        /// </summary>
        [Npoi.Mapper.Attributes.Column("初步判定(中文)")]
        public string AqyhcpAlias { get; set; }

        [Npoi.Mapper.Attributes.Column("区县核查结果")]
        public int? Result { get; set; }

        [Npoi.Mapper.Attributes.Column("区县核查结果(中文)")]
        public string ResultAlias { get; set; }
    }

    public class CityTaskBuildingExportDto
    {
        [Npoi.Mapper.Attributes.Column("ID")]
        public string Id { get; set; }
        [Npoi.Mapper.Attributes.Column("编号")]
        public string Bh { get; set; }
        [Npoi.Mapper.Attributes.Column("自建房安全排查编号")]
        public string Yhfwbh { get; set; }
        [Npoi.Mapper.Attributes.Column("普查房屋编号")]
        public string Fwbh { get; set; }
        [Npoi.Mapper.Attributes.Column("省编码")]
        public string Province { get; set; }
        [Npoi.Mapper.Attributes.Column("市编码")]
        public string City { get; set; }
        [Npoi.Mapper.Attributes.Column("区县编码")]
        public string Xzqdm { get; set; }
        [Npoi.Mapper.Attributes.Column("区县编码(中文)")]
        public string XzqdmAlias { get; set; }
        [Npoi.Mapper.Attributes.Column("街道编码")]
        public string Town { get; set; }
        [Npoi.Mapper.Attributes.Column("街道编码(中文)")]
        public string TownAlias { get; set; }
        [Npoi.Mapper.Attributes.Column("村（社区）编码")]
        public string Village { get; set; }
        [Npoi.Mapper.Attributes.Column("组")]
        public string ZuQg { get; set; }
        [Npoi.Mapper.Attributes.Column("路（街、巷）")]
        public string LuQg { get; set; }
        [Npoi.Mapper.Attributes.Column("号")]
        public string HaoQg { get; set; }
        [Npoi.Mapper.Attributes.Column("建筑地址")]
        public string Address { get; set; }
        [Npoi.Mapper.Attributes.Column("户主姓名")]
        public string Hzxm { get; set; }

        /// <summary>
        /// 初判 1存在严重安全隐患，3存在一般安全隐患，2未发现安全隐患
        /// </summary>
        [Npoi.Mapper.Attributes.Column("初步判定")]
        public string Aqyhcp { get; set; }

        /// <summary>
        /// 初判结果别名
        /// </summary>
        [Npoi.Mapper.Attributes.Column("初步判定(中文)")]
        public string AqyhcpAlias { get; set; }

        [Npoi.Mapper.Attributes.Column("区县核查结果")]
        public int? Result { get; set; }

        [Npoi.Mapper.Attributes.Column("区县核查结果(中文)")]
        public string ResultAlias { get; set; }

        [Npoi.Mapper.Attributes.Column("市级核查结果")]
        public int? CityResult { get; set; }

        [Npoi.Mapper.Attributes.Column("市级核查结果(中文)")]
        public string CityResultAlias { get; set; }
    }
}
